package org.a025;

import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;

public class T04_ConcurrentQueue {
	public static void main(String[] args) {
		Queue<String> strs=new ConcurrentLinkedQueue<>();
		for(int i =0;i<10;i++){
			strs.offer("a"+i);
		}
		System.out.println(strs);
		System.out.println(strs.size());
		//拿第一个，拿完就删
		System.out.println(strs.poll());
		System.out.println();
		System.out.println(strs.size());
		//拿第一个，不删
		System.out.println(strs.peek());
		System.out.println(strs.size());
	}
}
